package com.xncoding.freemarker.base;

import lombok.Getter;
import org.springframework.http.HttpStatus;
/**
 * idcoed:2025021116
 */
@Getter
public enum CommonErrorCode implements BaseErrorCode {
    /**
     * 成功
     */
    OK("100000", HttpStatus.BAD_REQUEST, "成功"),
    /**
     * 错误请求
     */
    BAD_REQUEST("100001", HttpStatus.BAD_REQUEST, "错误请求"),
    /**
     * 服务器异常
     */
    INTERNAL_SERVER_ERROR("100002", HttpStatus.INTERNAL_SERVER_ERROR, "服务器异常"),
    /**
     * 超过API限制的访问次数
     */
    TOO_MANY_REQUESTS("100003", HttpStatus.TOO_MANY_REQUESTS, "超过API限制的访问次数"),
    /**
     * 超过API一天访问次数
     */
    DAILY_TOO_MANY_REQUESTS("100004", HttpStatus.TOO_MANY_REQUESTS, "超过API一天访问次数");

    private final String code;

    private final HttpStatus status;

    private final String value;

    CommonErrorCode(String code, HttpStatus status, String value) {
        this.code = code;
        this.status = status;
        this.value = value;
    }
}